import { Code } from '~/components/text/code'

export const meta = {
  editUrl: 'pages/docs/api/v2/api-docs-mdx/errors/dns.mdx',
  lastEdited: '2019-10-17T14:44:04.000Z'
}

## DNS Errors

These error code could happen when using any [DNS related endpoint](#endpoints/dns).

### Missing DNS Record Name

The DNS record key `name` is required and was not provided. It should be either a subdomain or `@` for the domain itself.

<Code lang="json">{`{
  "error": {
    "code": "missing_name",
    "message": "Missing \`name\` parameter"
  }
}`}</Code>

### Missing DNS Record Type

The DNS record key `name` is required and was not provided. It could be [any valid DNS record](https://en.wikipedia.org/wiki/List_of_DNS_record_types).

<Code lang="json">{`{
  "error": {
    "code": "missing_type",
    "message": "Missing \`type\` parameter"
  }
}`}</Code>
